package easy;

public class Solution_1784 {

    public boolean checkOnesSegment(String s) {
        boolean flag = false;
        for (int i = 0; i < s.length(); i++) {
            if (s.charAt(i) == '0') {
                flag = true;
            } else if (flag) {
                return false;
            }
        }
        return true;
    }
}
